package company.C58_AC;

public class C5 {

    public static void main(String[] args) {
        C5 c5 = new C5();
        System.out.println(c5.getCount(8, 40));
    }

    int count = 0;


    public int getCount(int m, int n) {
        helper(0, 0, m, n);
        return count;
    }

    // 0000000
    // 1111111
    private void helper(int index, int sum, int m, int n) {
        if (index == m) {
            if (sum == n)
                count++;
            return;
        }
        for (int i = 0; i <= 10; i++) {
            helper(index + 1, sum + i, m, n);
        }
    }
}
